function [ classes ] = kNearestNeighborClassifier( train, valid )
    % classify the images using k-nearest algorithm
    
    % get the size of the validation matrix
    [train_vector_x, ~] = size(train);
    group_vector = [2 .* ones(train_vector_x / 3, 1); ones(train_vector_x / 3, 1); 3 .* ones(train_vector_x / 3, 1)];
    
    % by trainig for a lot of values for the k paramer, we found that 15
    % gives the best accuracy
    classes = knnclassify(valid, train, group_vector, 15);
end

